/**
 * Copyright (C) 2017 - 2020 https://github.com/joewee
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *//*

package com.bifrost.service.impl;

import com.bifrost.entity.ScheduleJob;
import com.bifrost.entity.ScheduleJobLog;
import com.bifrost.repository.ScheduleJobLogRepository;
import com.bifrost.repository.ScheduleJobRepository;
import com.bifrost.service.ScheduleJobLogService;
import com.bifrost.util.ScheduleUtils;
import org.quartz.CronTrigger;
import org.quartz.Scheduler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

*/
/**
 * @author joewee
 * @version 1.0.0
 * @Date 2017/11/6 15:50
 *//*

@Service("scheduleJobLogService")
public class ScheduleJobLogServiceImpl implements ScheduleJobLogService {
    @Autowired(required = false)
    @Lazy
    private Scheduler scheduler;
    @Autowired
    private ScheduleJobRepository scheduleJobRepository;
    @Autowired
    private ScheduleJobLogRepository scheduleJobLogRepository;

    */
/**
     *  项目启动时，初始化定时器
     *//*

    //@PostConstruct
    public void init() {
        List<ScheduleJob> scheduleJobList = scheduleJobRepository.findAll();
        for (ScheduleJob scheduleJob : scheduleJobList) {
            */
/*CronTrigger cronTrigger = ScheduleUtils.getCronTrigger(scheduler, scheduleJob.getId());
            //如果不存在，则创建
            if (cronTrigger == null) {
                ScheduleUtils.createScheduleJob(scheduler, scheduleJob);
            } else {
                ScheduleUtils.updateScheduleJob(scheduler, scheduleJob);
            }*//*

        }
    }
    */
/**
     * 根据ID，查询定时任务日志
     *
     * @param jobId
     *//*

    @Override
    public ScheduleJobLog queryObject(Long jobId) {
        return null;
    }

    */
/**
     * 查询定时任务日志列表
     *
     * @param map
     *//*

    @Override
    public List<ScheduleJobLog> queryList(Map<String, Object> map) {
        return null;
    }

    */
/**
     * 查询总数
     *
     * @param map
     *//*

    @Override
    public int queryTotal(Map<String, Object> map) {
        return 0;
    }

    */
/**
     * 保存定时任务日志
     *
     * @param log
     *//*

    @Override
    public void save(ScheduleJobLog log) {
        scheduleJobLogRepository.save(log);
    }
}
*/
